﻿<%@ Page Title="管理员信息维护" Language="C#" MasterPageFile="~/AdminMenu.Master" AutoEventWireup="true"
    CodeBehind="ManageUser.aspx.cs" Inherits="RealtyManagementSystem.Web.Admin.ManageUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="admin_menuHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="admin_menuContent" runat="server">
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" AutoGenerateOrderByClause="True"
        ConnectionString="metadata=res://*/RealtyModels.csdl|res://*/RealtyModels.ssdl|res://*/RealtyModels.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\sqlexpress;initial catalog=realtydb;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;"
        DefaultContainerName="realtydbEntities" EnableFlattening="False" EntitySetName="aspnet_Users"
        EntityTypeFilter="aspnet_Users" Select="it.[UserName], it.[MobileAlias], it.[IsAnonymous], it.[LastActivityDate], it.[aspnet_Roles]">
    </asp:EntityDataSource>
    <a href="CreateNewUser.aspx" class="create_new_user">点击这里，创建一个新用户。</a>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
        DataSourceID="EntityDataSource1" ForeColor="#333333" GridLines="Both" CssClass="grid_style">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="用户名" ReadOnly="True" SortExpression="UserName" />
            <asp:BoundField DataField="MobileAlias" HeaderText="MobileAlias" ReadOnly="True"
                SortExpression="MobileAlias" />
            <asp:CheckBoxField DataField="IsAnonymous" HeaderText="IsAnonymous" ReadOnly="True"
                SortExpression="IsAnonymous" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" />
            <asp:BoundField DataField="LastActivityDate" HeaderText="最后访问时间" ReadOnly="True"
                SortExpression="LastActivityDate" />
            <asp:TemplateField HeaderText="用户角色" SortExpression="aspnet_Roles">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("aspnet_Roles") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%= GetRolesNameList(Eval("aspnet_Roles")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
</asp:Content>